cmake_minimum_required(VERSION 3.5.0)

project(fxcc_test_graph_platform)

set(CMAKE_CXX_STANDARD 17)

if(WIN32)
set(PHYSX_LIBS 
    PhysXCharacterKinematic_static_64
    PhysXCommon_64
    PhysXCooking_64
    PhysXExtensions_static_64
    PhysXFoundation_64
    PhysXPvdSDK_static_64
    PhysXTask_static_64
    PhysXVehicle_static_64
    PhysX_64
)
endif()

if(UNIX)
set(PHYSX_LIBS 

    PhysXExtensions_static_64
    PhysXCooking_static_64
    PhysX_static_64
    PhysXPvdSDK_static_64
    PhysXCharacterKinematic_static_64
    PhysXCommon_static_64
    PhysXFoundation_static_64
    pthread
    dl
)
endif()

add_executable(fxcc_test_scfg scfg.cpp)
target_link_libraries(fxcc_test_scfg PUBLIC fxcc_graph_opengl3 fxcc_yml_graph_common fxcc_imgui_graph_common assimp)

add_executable(fxcc_test_font font.cpp)
target_link_libraries(fxcc_test_font PUBLIC  fxcc_yml_graph_common fxcc_graph_opengl3_font  fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_phong phong.cpp)
target_link_libraries(fxcc_test_phong PUBLIC fxcc_graph_opengl3_phong fxcc_yml_graph_common   fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_entt entt.cpp)

add_executable(fxcc_test_video_player video_player.cpp)
target_link_libraries(fxcc_test_video_player PUBLIC  )

add_executable(fxcc_test_node node.cpp)
target_link_libraries(fxcc_test_node PUBLIC  fxcc_imgui_graph_common assimp freetype)


add_executable(fxcc_test_pbr pbr.cpp)
target_link_libraries(fxcc_test_pbr PUBLIC fxcc_graph_opengl3_pbr fxcc_yml_graph_common  fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_texture2d texture2d.cpp)
target_link_libraries(fxcc_test_texture2d PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_texturecube texturecube.cpp)
target_link_libraries(fxcc_test_texturecube PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_texturecuberttcube texturecuberttcube.cpp)
target_link_libraries(fxcc_test_texturecuberttcube PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_cmd cmdtest.cpp)
target_link_libraries(fxcc_test_cmd PUBLIC fxcc_core sysx)

add_executable(fxcc_test_texturearray texturearray.cpp)
target_link_libraries(fxcc_test_texturearray PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_texture3d texture3d.cpp)
target_link_libraries(fxcc_test_texture3d PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_rect_pack rect_pack.cpp)
target_link_libraries(fxcc_test_rect_pack PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_rect_pack2 rect_pack2.cpp)
target_link_libraries(fxcc_test_rect_pack2 PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )


add_executable(fxcc_test_sdf2 sdf2.cpp)
target_link_libraries(fxcc_test_sdf2 PUBLIC fxcc_graph_opengl3 fxcc_yml_graph_common fxcc_bin_graph_common  fxcc_imgui_graph_common )
target_link_libraries(fxcc_test_sdf2 PRIVATE msdfgen-core msdfgen-ext)

add_executable(fxcc_test_json json.cpp)
target_link_libraries(fxcc_test_json 
    PUBLIC 
    fxcc_graph_opengl3 
    fxcc_yml_graph_common 
    fxcc_bin_graph_common  
    fxcc_json  
    fxcc_imgui_graph_common )


add_executable(fxcc_test_sdf3 sdf3.cpp)
target_link_libraries(fxcc_test_sdf3 PUBLIC fxcc_core sysx)

add_executable(fxcc_test_sdf_render sdf_render.cpp)
target_link_libraries(fxcc_test_sdf_render PUBLIC fxcc_graph_opengl3 fxcc_yml_graph_common fxcc_bin_graph_common  fxcc_imgui_graph_common )
target_link_libraries(fxcc_test_sdf_render PRIVATE msdfgen-core msdfgen-ext)

add_executable(fxcc_test_msdf_render msdf_render.cpp)
target_link_libraries(fxcc_test_msdf_render PUBLIC fxcc_graph_opengl3  fxcc_json_graph_common  fxcc_yml_graph_common fxcc_bin_graph_common  fxcc_imgui_graph_common )


add_executable(fxcc_test_skybox skybox.cpp)
target_link_libraries(fxcc_test_skybox PUBLIC   fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_bin bin.cpp)
target_link_libraries(fxcc_test_bin PUBLIC 
    fxcc_imgui_graph_common
    fxcc_graph_opengl3 fxcc_yml_graph_common 
    
)


add_executable(fxcc_test_gli gli.cpp)
target_link_libraries(fxcc_test_gli PUBLIC  fxcc_graph_common )

add_executable(fxcc_test_glslang glslang.cpp)
target_link_libraries(fxcc_test_glslang PUBLIC fxcc_graph_opengl3 fxcc_yml_graph_common  fxcc_imgui_graph_common )

add_executable(fxcc_test_ssao4 ssao4.cpp)
target_link_libraries(fxcc_test_ssao4 PUBLIC fxcc_graph_opengl3_ssao fxcc_yml_graph_common   fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_toon toon.cpp)
target_link_libraries(fxcc_test_toon PUBLIC   fxcc_imgui_graph_common assimp freetype)


add_executable(fxcc_test_compute compute.cpp)
target_link_libraries(fxcc_test_compute PUBLIC   fxcc_imgui_graph_common assimp freetype)

add_executable(fxcc_test_must must.cpp)


add_executable(fxcc_test_mono mono.cpp)
target_link_libraries(fxcc_test_mono PUBLIC   fxcc_imgui_graph_common fxcc_mono)

add_executable(fxcc_test_bloom bloom.cpp)
target_link_libraries(fxcc_test_bloom PUBLIC   fxcc_imgui_graph_common )

add_executable(fxcc_test_ecs ecs.cpp)
target_link_libraries(fxcc_test_ecs PUBLIC   fxcc_imgui_graph_common )

add_executable(fxcc_test_effect2d effect2d.cpp)
target_link_libraries(fxcc_test_effect2d PUBLIC   fxcc_imgui_graph_common )

add_executable(fxcc_test_border border.cpp)
target_link_libraries(fxcc_test_border PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common)

add_executable(fxcc_test_actor actor.cpp)
target_link_libraries(fxcc_test_actor PUBLIC  fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_graph_opengl3_pbr fxcc_yml_graph_common)

add_executable(fxcc_test_wave wave.cpp)
target_link_libraries(fxcc_test_wave PUBLIC  fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_graph_opengl3_pbr fxcc_yml_graph_common)


add_executable(fxcc_test_mini mini.cpp)
target_link_libraries(fxcc_test_mini PUBLIC  
    fxcc_imgui_graph_common 
    fxcc_graph_opengl3 
    fxcc_graph_opengl3_pbr 
    fxcc_yml_graph_common
    fxcc_mono
    fxcc_imgui_mono
    fxcc_yml_mono
)

add_library(fxcc_test_mini_cs SHARED mini_cs.cpp)
set_target_properties(fxcc_test_mini_cs PROPERTIES DEBUG_POSTFIX "")
target_link_libraries(fxcc_test_mini_cs PUBLIC  
    fxcc_imgui_graph_common 
    fxcc_graph_opengl3 
    fxcc_graph_opengl3_pbr 
    fxcc_yml_graph_common
    fxcc_mono
    fxcc_imgui_mono
    fxcc_yml_mono
)

add_executable(fxcc_test_pickup pickup.cpp)
target_link_libraries(fxcc_test_pickup PUBLIC   fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_mesh2d mesh2d.cpp)
target_link_libraries(fxcc_test_mesh2d PUBLIC  
    fxcc_bin_graph_common 
    fxcc_imgui_graph_common 
    fxcc_graph_opengl3 
    fxcc_yml_graph_common 
)

add_executable(fxcc_test_thread thread.cpp)
target_link_libraries(fxcc_test_thread PUBLIC   sysx )


add_executable(fxcc_test_importer importer.cpp)
target_link_libraries(fxcc_test_importer PUBLIC fxcc_graph_common fxcc_yml_graph_common  fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common _ssao)

add_executable(fxcc_test_audio audio.cpp)
target_link_libraries(fxcc_test_audio PUBLIC fxcc_audio_openal fxcc_imgui_audio_common  fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common _ssao)

add_executable(fxcc_test_shadow shadow.cpp)
target_link_libraries(fxcc_test_shadow PUBLIC     fxcc_imgui_graph_common fxcc_graph_opengl3 fxcc_yml_graph_common )

add_executable(fxcc_test_tessellation tessellation.cpp)
target_link_libraries(fxcc_test_tessellation  PUBLIC   fxcc_imgui_graph_common )

if(WIN32)
add_executable(fxcc_test_directX11 directX11.cpp)
target_link_libraries(fxcc_test_directX11 PUBLIC  fxcc_graph_directX11 fxcc_imgui_graph_common )
endif()